home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / devel / lang / c / c-tools-.000 / c-tools- / c-tools-0.4 / Makefile < prev    next >
Encoding:
Makefile  |  1995-08-13  |  2.1 KB  |  89 lines

  1. # Makefile for c-tools 0.4
  2.  
  3. # Copyright (C) 1995 Sandro Sigala - <sansig@freenet.hut.fi>
  4.  
  5. # $Id: Makefile,v 1.28 1995/08/12 15:14:13 sandro Exp $
  6.  
  7. #
  8. # type `make' for making the binaries
  9. # type `make install' for installing the binaries
  10. # type `make maninstall' for installing the man pages
  11. # type `make clean' to clean-up the source tree
  12. #
  13.  
  14. CC = gcc # your C compiler
  15. LEX = flex # your scanner generator
  16.  
  17. BINDIR = /usr/bin
  18. LIBDIR = /usr/lib
  19. MANDIR = /usr/man
  20.  
  21. CINFODIR = $(LIBDIR)/cinfo
  22.  
  23. YYWRAP = 1 # can be 1 or 0. if one do not work, try the other. (=
  24.  
  25. OPTFLAGS = -O2 -fomit-frame-pointer
  26. CFLAGS = -ansi -pedantic -Wall $(OPTFLAGS)
  27. LDFLAGS =
  28.  
  29. .c.o:
  30.     $(CC) -c $(CFLAGS) $<
  31.  
  32. BINARIES = obscure highlight hsort cinfo
  33. MANPAGES = obscure.1 highlight.1 hsort.1 cinfo.1
  34. CINFOFILES = cinfo.lib cinfo.lib.standardc
  35.  
  36. all: $(BINARIES)
  37.  
  38. obscure: obscure.o hash.o misc.o lex.o
  39.     $(CC) $(LDFLAGS) -o $@ obscure.o hash.o misc.o lex.o
  40.  
  41. highlight: highlight.o misc.o lex.o
  42.     $(CC) $(LDFLAGS) -o $@ highlight.o misc.o lex.o
  43.  
  44. cinfo: cinfo.o cinfolib.o misc.o
  45.     $(CC) $(LDFLAGS) -o $@ cinfo.o cinfolib.o misc.o
  46.  
  47. cinfo.o: cinfo.c
  48.     $(CC) -c -DDEFAULT_SEARCH_PATH=\"$(CINFODIR)\" $(CFLAGS) $<
  49.  
  50. hsort.o: hsort.c
  51.     $(CC) -c -DREPLACE_YYWRAP=$(YYWRAP) $(CFLAGS) $<
  52.  
  53. hsort: hsort.o
  54.     $(CC) $(LDFLAGS) -o $@ hsort.o
  55.  
  56. hsort.c: hsort.l
  57.     $(LEX) hsort.l
  58.     mv lex.yy.c hsort.c
  59.  
  60. hashtest: hashtest.o hash.o misc.o
  61.  
  62. install: $(BINARIES) $(CINFOFILES)
  63.     mkdir -p $(BINDIR)
  64.     mkdir -p $(CINFODIR)
  65.     install -s $(BINARIES) $(BINDIR)
  66.     install -m 0644 $(CINFOFILES) $(CINFODIR)
  67.  
  68. maninstall: $(MANPAGES)
  69.     mkdir -p $(MANDIR)/man1
  70.     install -m 0644 $(MANPAGES) $(MANDIR)/man1
  71.  
  72. clean:
  73.     @(cd examples; $(MAKE) clean)
  74.     rm -f core *.o *~
  75.     rm -f hsort.c
  76.     rm -f $(BINARIES)
  77.  
  78. # Automatically generated dependencies
  79. cinfo.o: cinfo.c misc.h cinfolib.h version.h
  80. cinfolib.o: cinfolib.c misc.h cinfolib.h
  81. hash.o: hash.c hash.h misc.h
  82. hashtest.o: hashtest.c hash.h
  83. highlight.o: highlight.c lex.h misc.h version.h highlight.h
  84. hsort.o: hsort.c version.h
  85. lex.o: lex.c lex.h misc.h
  86. misc.o: misc.c
  87. obscure.o: obscure.c lex.h hash.h misc.h version.h obscure.h
  88. # Makefile ends here
  89.